package org.ydeity.lucene.convert;

import org.apache.lucene.document.Document;
import org.ydeity.lucene.configuration.LuceneDocumentProperties;

import java.util.Map;

public interface LuceneConvert {

    /**
     * Returns the underlying {@link org.springframework.data.mapping.context.MappingContext} used by the converter.
     *
     * @return never {@literal null}
     */
    Map<Class<?>, LuceneDocumentProperties> getMappingContext();

    LuceneDocumentProperties getLuceneDocumentProperties(Class<?> clazz);

    <T> Document getLuceneDocument(Class<?> clazz,T t);

    <T> Document getLuceneDocument(T t);
}
